package pattern.state.model;

public class Reverse extends Gear{
	
	public Reverse(Car car) {
		this.car = car;
	}

	@Override
	public void accelerate() throws Exception {
		throw new IllegalStateException("How?!");
		
	}

	@Override
	public void slowDown() throws Exception {
		throw new IllegalStateException("Can't be done");
	}

	@Override
	public void goBack() throws Exception {
		throw new IllegalStateException("Going back already");
		
	}

	@Override
	public void stop() throws Exception {
		car.setText("Stop --- Neutral");
		car.setState(car.getNeutral());
		
	}


}
